package top.makeprogress.taobaospider.config;

public class TaobaoSpilderConfig {

    private static String URL_ALL_ORDER;
    private static Integer ORDER_MAX;
    private static Integer ORDER_CYCLE;
    private static Integer INTERVAL_TIME;
    private static String FILE_TMP_BASEPATH;
    private static String FILE_EXCEL_BASEPATH;


    static {
        URL_ALL_ORDER = ConfigProperties.getString("url.allorder");
        ORDER_MAX = ConfigProperties.getInteger("order.max");
        ORDER_CYCLE = ConfigProperties.getInteger("order.cycle");
        INTERVAL_TIME = ConfigProperties.getInteger("interval.time");
        FILE_TMP_BASEPATH = ConfigProperties.getString("file.tmp.basepath");
        FILE_EXCEL_BASEPATH = ConfigProperties.getString("file.excel.basepath");
    }

    public static String getUrlAllOrder() {
        return URL_ALL_ORDER;
    }

    public static Integer getOrderMax() {
        return ORDER_MAX != null ? ORDER_MAX : 0;
    }

    public static Integer getOrderCycle() {
        return ORDER_CYCLE != null ? ORDER_CYCLE : 0;
    }

    public static Integer getIntervalTime() {
        return INTERVAL_TIME != null ? INTERVAL_TIME : 0;
    }

    public static String getFileTmpBasepath() {
        return FILE_TMP_BASEPATH;
    }

    public static String getfileExcelBasepath() {
        return FILE_EXCEL_BASEPATH;
    }
}
